<?php

/**
 * NewsCategory form.
 *
 * @package    elearning
 * @subpackage form
 * @author     Your name here
 */
class NewsCategoryForm extends BaseNewsCategoryForm
{
  public function configure()
  {
		unset($this['parent_id'], $this['created_at'], $this['updated_at']);
		
		$lang_current = sfContext::getInstance()->getUser()->getCulture();
		$this->languages = array($lang_current => $lang_current);
		$langs = array_keys($this->languages);
		$this->embedI18n($langs);
		foreach($this->languages as $lang => $label)
		{
		  $this->widgetSchema[$lang]->setLabel($label);
		}
		
		$this->widgetSchema['is_public'] = new sfWidgetFormInputCheckbox(array("value_attribute_value" => 1),array('value' => 1));
  }
}
